<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 公司部门组验证器
 */
class Group extends AdminBase
{
    
    // 验证规则
    protected $rule =   [
        
        'group_name'  => 'require',
        'company_id'  => 'require',
        'branch_id'  => 'require',
    ];
    
    // 验证提示
    protected $message  =   [
        
        'group_name.require'    => '部门名不能为空',
        'company_id.require'    => '请选择公司名',
        'branch_id.require'    => '请选择公司名',
    ];

    // 应用场景
    protected $scene = [
        
        'add'   =>  ['group_name','company_id','branch_id'],
        'edit'  =>  ['group_name','company_id','branch_id'],
    ];
}
